#include <stdio.h>
#include <malloc.h>
#include <assert.h>
#include "Creature.h"


void initialiser_Creature(Creature *crea)
	{
		crea->PV_creature = POINT_DE_VIE;
		crea->pointDeVie_Actuels = POINT_DE_VIE;
		crea->recompense = RECOMPENSE;
		crea->positionY = 5;
		crea->positionX = 0;
		crea->vivant = 1;
	}

void liberer_Creature(Creature *crea)
	{
		crea->PV_creature = 0;
		crea->pointDeVie_Actuels = 0;
		crea->recompense = 0;
		crea->positionX = 0;
		crea->positionY = 0;
		crea->vivant = 0;
	}

const int creagetConstPositionX( Creature * crea)
{
	return crea->positionX;
}

const int creagetConstPositionY( Creature * crea)
{
	return crea->positionY;
}

int creagetpointDeVie_Max( Creature *crea)
	{
		return crea->PV_creature;
	}

void creasetpointDeVie_Max( Creature *crea, int pv_max)
	{
		crea->PV_creature = pv_max;
	}

int creagetpointDeVie_Actuels( Creature *crea)
	{
		return crea->pointDeVie_Actuels;
	}

void creasetpointDeVie_Actuels( Creature *crea, int pv_actuels)
	{
		crea->pointDeVie_Actuels = pv_actuels;
	}
int creagetRecompense( Creature *crea)
	{
		return crea->recompense;
	}
void creasetRecompense( Creature *crea, int recompense)
	{
		crea->recompense = recompense;
	}

void avancer_creature(Creature *crea) 	/* pour faire avancer la creature */
{
	
		crea->positionX ++;
	
}

void crea_degat(Creature * crea, int degat)
{
	crea->pointDeVie_Actuels = crea->pointDeVie_Actuels - degat;
	if(crea->pointDeVie_Actuels <= 0)
	{
		crea->vivant = 0;
	}
}

